<?php
function calc($a,$b,...$c){
    // return $a+$b;
    // echo $a+$b . '<br>';
    print_r($c);
    echo '<br>';
    $sum=0;
    foreach ($c as $key => $value) {
        $sum=$sum+$value;
    }
    echo $a+$b+$sum;
}
// echo calc(1,2);
calc(1,2,3,4,5,6);
?>